﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;

[Serializable]  // 序列化
public class PanelInfo : ISerializationCallbackReceiver
{
	[NonSerialized]     // 单独属性, 表示不序列化
	public UIPanelType uiPanelType;
	public string upnlType;
	public string path;

	public void OnAfterDeserialize() {  /* 序列化之后发生的事(这里是把字符串转换成枚举) */
		uiPanelType = (UIPanelType)Enum.Parse(typeof(UIPanelType), upnlType);
	}

	public void OnBeforeSerialize() {

		// throw new System.NotFiniteNumberException();
	}
}
